#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_pushButton_clicked()
{
    QString str = "今天的安排是什么：";
    if(ui->checkBox_study->isChecked())
    {
        str += ui->checkBox_study->text() + " ";
    }
    if(ui->checkBox_game->isChecked())
    {
        str += ui->checkBox_game->text() + " ";
    }
    if(ui->checkBox_work->isChecked())
    {
        str += ui->checkBox_work->text();
    }
    ui->label->setText(str);
}


